
import request from '@/sheep/request';

export default {
    //采购列表
    getPurchaseApproveList: (params) =>
    request({
        url: 'api/purchase/approve_list',
        method: 'GET',
        params,
        custom: {
          showSuccess: false,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: true,
          loadingMsg: '加载中',
          auth: true,
        },
    }),
    //采购申请列表
    getPurchaseIndex: (params) =>
    request({
      url: 'api/purchase/index',
      method: 'GET',
      custom: {
          showSuccess: false,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: true,
          loadingMsg: '加载中',
          auth: true,
      },
      params,
    }),
    // 采购详情
    getPurchaseView: (params) =>
    request({
      url: 'api/purchase/view',
      method: 'GET',
      custom: {
          showSuccess: false,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: true,
          loadingMsg: '加载中',
          auth: true,
      },
      params,
    }),
    //采购添加
    postPurchaseAdd: (data) =>
    request({
      url: 'api/purchase/add',
      method: 'POST',
      custom: {
          showSuccess: true,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: false,
          loadingMsg: '加载中',
          auth: true,
      },
      data,
    }),
 	//采购审批通过
	getPurchasePass: (params) =>
    request({
        url: 'api/purchase/pass',
        method: 'GET',
        params,
        custom: {
          showSuccess: true,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: false,
          loadingMsg: '加载中',
          auth: true,
        },
    }),
//采购审批拒绝
postPurchaseRefuse: (params) =>
    request({
        url: 'api/purchase/refuse',
        method: 'POST',
        params,
        custom: {
          showSuccess: true,
          successMsg: '',
          showError: true,
          errorMsg: '',
          showLoading: false,
          loadingMsg: '加载中',
          auth: true,
        },
    }),
}





